package com.shixun.milktea.mapper;

import com.shixun.milktea.entity.Orderdetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shixun.milktea.vo.OrderDetailVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zrs
 * @since 2022-06-07
 */
public interface OrderdetailMapper extends BaseMapper<Orderdetail> {
    /*
     * @Description: 根据总订单id和订单明细进行插入数据
     * @param primaryKey: 总订单主键
     * @param list: 订单明细
     * @return: java.lang.Integer
     */
    Integer addAllDetailsByOrderId(@Param("primaryKey") Integer primaryKey,@Param("detailVos")List<OrderDetailVo> detailVos);
    /*
     * @Description: 通过订单id获取该订单所有明细
     * @param orderId: 订单id
     * @return: java.util.List<com.shixun.milktea.entity.Orderdetail>
     */
    List<Orderdetail> findAllDetailsByOrderId(@Param("orderId") Integer orderId);
}
